package cn.dakaqi.vo.response.pu;

import cn.dakaqi.entities.user.User;
import cn.dakaqi.entities.user.Volunteer;
import lombok.Data;
import lombok.ToString;

/**
 * @author beliveli on 2016/8/12/0012
 */
@SuppressWarnings("unused")
@Data
@ToString
public class UserInfoResponseVo {
    private long userId;
    private String email;
    private int delStatus;

    private String volunteerCode;//志愿者一号通编号
    private String memberCode;//会员本地唯一编号
    private String mobile;//手机号
    private String nickName;//昵称
    private String realName;//真实姓名
    private String headUrl;//头图
    private String province;//省市
    private String city;//城市
    private String district;//区县
    private String cardType;//证件类型
    private String cardNO;//证件号
    private String residenceAddress;//现居住地
    private String job;//工作
    private String serviceField;//服务领域
    private String skill;//服务技能
    private String QQ;//QQ号
    private String sign;//个人签名
    private String weChat;//微信号
    private long times;//活动时间
    private long vTimes;//公益时间
    private int locked;//是否被锁定
    private String sex;//性别
    private String birthDay;//生日
    private String education;//文化成度
    private String nation;//民族
    private String nativePlace;//籍贯
    private String type; //用户类型
    private int acts;          //个人累计活动数
    private String lastJoinActDate;//最后一次参加活动的时间

    private int isInsure = 2;//是否已购买保险 1已购买 2未购买

    public static UserInfoResponseVo build(User user,Volunteer volunteer){
        UserInfoResponseVo userInfoResponseVo = new UserInfoResponseVo();

        userInfoResponseVo.setUserId(user.getId());
        userInfoResponseVo.setEmail(user.getEmail());
        userInfoResponseVo.setDelStatus(user.getDelStatus());

        userInfoResponseVo.setVolunteerCode(volunteer.getVolunteerCode());
        userInfoResponseVo.setMemberCode(volunteer.getMemberCode());
        userInfoResponseVo.setMobile(volunteer.getMobile());
        userInfoResponseVo.setNickName(volunteer.getNickName());
        userInfoResponseVo.setRealName(volunteer.getRealName());
        userInfoResponseVo.setHeadUrl(volunteer.getHeadUrl());
        userInfoResponseVo.setProvince(volunteer.getProvince());
        userInfoResponseVo.setCity(volunteer.getCity());
        userInfoResponseVo.setDistrict(volunteer.getDistrict());
        userInfoResponseVo.setCardType(volunteer.getCardType());
        userInfoResponseVo.setCardNO(volunteer.getCardNO());
        userInfoResponseVo.setResidenceAddress(volunteer.getResidenceAddress());
        userInfoResponseVo.setJob(volunteer.getJob());
        userInfoResponseVo.setServiceField(volunteer.getServiceField());
        userInfoResponseVo.setSkill(volunteer.getSkill());
        userInfoResponseVo.setQQ(volunteer.getQQ());
        userInfoResponseVo.setSign(volunteer.getSign());
        userInfoResponseVo.setWeChat(volunteer.getWeChat());
        userInfoResponseVo.setTimes(volunteer.getTimes());
        userInfoResponseVo.setVTimes(volunteer.getvTimes());
        userInfoResponseVo.setLocked(volunteer.getLocked());
        userInfoResponseVo.setSex(volunteer.getSex());
        userInfoResponseVo.setBirthDay(volunteer.getBirthDay());
        userInfoResponseVo.setEducation(volunteer.getEducation());
        userInfoResponseVo.setNation(volunteer.getNation());
        userInfoResponseVo.setNativePlace(volunteer.getNativePlace());
        userInfoResponseVo.setType(volunteer.getType());
        userInfoResponseVo.setActs(volunteer.getActs());
        userInfoResponseVo.setLastJoinActDate(volunteer.getLastJoinActDate());

        return userInfoResponseVo;
    }
}
